home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / ExitZoo.Dxr / 00132.ls < prev    next >
Encoding:
Text File  |  1997-11-21  |  3.0 KB  |  71 lines

  1. on getNextGroup
  2.   global wagonList, wagonPos
  3.   if count(wagonList) = 1 then
  4.     set the castNum of sprite 13 to the number of cast "left wheel dark"
  5.     set the castNum of sprite 14 to the number of cast "right wheel dark"
  6.     set the castNum of sprite 5 to the number of cast getAt(wagonList, wagonPos)
  7.     set the locV of sprite 6 to -100
  8.     set the locV of sprite 7 to -100
  9.   else
  10.     if count(wagonList) = 2 then
  11.       set the castNum of sprite 13 to the number of cast "left wheel dark"
  12.       set the castNum of sprite 14 to the number of cast "right wheel dark"
  13.       set the castNum of sprite 5 to the number of cast getAt(wagonList, wagonPos)
  14.       set the castNum of sprite 6 to the number of cast getAt(wagonList, wagonPos + 1)
  15.       set the locV of sprite 7 to -100
  16.     else
  17.       if count(wagonList) = 3 then
  18.         set the castNum of sprite 13 to the number of cast "left wheel dark"
  19.         set the castNum of sprite 14 to the number of cast "right wheel dark"
  20.         set the castNum of sprite 5 to the number of cast getAt(wagonList, wagonPos)
  21.         set the castNum of sprite 6 to the number of cast getAt(wagonList, wagonPos + 1)
  22.         set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos + 2)
  23.       else
  24.         repeat with u = 5 to 7
  25.           set the castNum of sprite u to the number of cast getAt(wagonList, wagonPos)
  26.           set wagonPos to wagonPos + 1
  27.           if wagonPos > count(wagonList) then
  28.             set wagonPos to 1
  29.           end if
  30.         end repeat
  31.       end if
  32.     end if
  33.   end if
  34.   updateStage()
  35. end
  36.  
  37. on getPrevGroup
  38.   global wagonList, wagonPos
  39.   if count(wagonList) = 1 then
  40.     set the castNum of sprite 13 to the number of cast "left wheel dark"
  41.     set the castNum of sprite 14 to the number of cast "right wheel dark"
  42.     set the castNum of sprite 5 to the number of cast getAt(wagonList, wagonPos)
  43.     set the locV of sprite 7 to -100
  44.   else
  45.     if count(wagonList) = 2 then
  46.       set the castNum of sprite 13 to the number of cast "left wheel dark"
  47.       set the castNum of sprite 14 to the number of cast "right wheel dark"
  48.       set the castNum of sprite 5 to the number of cast getAt(wagonList, wagonPos)
  49.       set the castNum of sprite 6 to the number of cast getAt(wagonList, wagonPos + 1)
  50.       set the locV of sprite 7 to -100
  51.     else
  52.       if count(wagonList) = 3 then
  53.         set the castNum of sprite 13 to the number of cast "left wheel dark"
  54.         set the castNum of sprite 14 to the number of cast "right wheel dark"
  55.         set the castNum of sprite 5 to the number of cast getAt(wagonList, wagonPos)
  56.         set the castNum of sprite 6 to the number of cast getAt(wagonList, wagonPos + 1)
  57.         set the castNum of sprite 7 to the number of cast getAt(wagonList, wagonPos + 2)
  58.       else
  59.         repeat with u = 5 to 7
  60.           set the castNum of sprite u to the number of cast getAt(wagonList, wagonPos)
  61.           set wagonPos to wagonPos - 1
  62.           if wagonPos < 1 then
  63.             set wagonPos to count(wagonList)
  64.           end if
  65.         end repeat
  66.       end if
  67.     end if
  68.   end if
  69.   updateStage()
  70. end
  71.